﻿using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;
using Orchard.ContentManagement.MetaData;

namespace Mod.NextPreviousItem {
    public class Migrations : DataMigrationImpl {

         public int Create() {
             ContentDefinitionManager.AlterPartDefinition("NextPreviousItemPart", cfg =>
                 cfg.Attachable());
             return 1;
         }

         public int UpdateFrom1()
         {
             SchemaBuilder.CreateTable("NextPreviousItemPartRecord",
                 table => table
                     .ContentPartRecord()
                 );
             return 2;
         }

    }
}